{layout name="/base"}
<link rel="stylesheet" type="text/css" href="/front/css/common.css" />
<link rel="stylesheet" type="text/css" href="/front/css/jquery-ui.css" />
<script src="/front/js/jquery.js" type="text/javascript"></script>
<script src="/front/js/jquery-ui.js"></script>
<script src="/front/js/weifeng.js"></script>
<script>
	//数组状态：分享中
	var arr1 = ["{$share|implode='", "',###}"];
	//数组状态：分享成功
	var arr2 = ["{$disables|implode='", "',###}"];
	//数组状态：出租成功
	var arr3 = [""];
	//数组状态：出租中
	var arr4 = ["{$rents|implode='", "',###}"];
	//每天的出租价格数组
	var arr4a = {$rentPriceArray};

	//判断日期，并设置其状态样式
	//判断日期，并设置其状态样式
	function selectedate(date) {
		var d = formatterDate(date);
		if($.inArray(d, arr2) != -1) {
			return [false, '', '分享成功'];
		} else if($.inArray(d, arr1) != -1) {
			return [true, 'red', '分享中'];
		} else if($.inArray(d, arr3) != -1) {
			return [false, '', '出租成功'];
		} else if($.inArray(d, arr4) != -1) {
			var dd = arr4a['' + String(d) + ''];
			return [true, 'blue', '出租中,单日价格：' + String(dd)];
		} else
			return [true];
	}
</script>
<div class="row">
	<div class="col-lg-12">
		<h1>房车管理 <small>编辑房车信息</small></h1>
		<ol class="breadcrumb">
			<li>
				<a href="/index"><i class="fa fa-dashboard"></i> 管理首页</a>
			</li>
			<li>
				<a href="/caravans"><i class="fa fa-dashboard"></i> 房车信息列表</a>
			</li>
			<li class="active"><i class="fa fa-table"></i> 编辑房车信息</li>
		</ol>
		<div class="alert alert-success alert-dismissable">
			<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> 这里可以查看房车信息
		</div>
	</div>
</div>
<!-- /.row -->
<div class="row">
	<!-- 选项卡start -->
	<div class="bs-example">
		<!-- 选项卡标题start -->
		<ul class="nav nav-tabs" style="margin-bottom:15px;">
			<li class="active">
				<a href="#one" data-toggle="tab">基本信息</a>
			</li>
		</ul>
		<!-- 选项卡标题end -->
		<!-- 选项卡内容start -->
		<div id="myTabContent" class="tab-content">
			<!-- 选项卡内容1start -->
			<div id="one" class="tab-pane fade active in">
				<!-- 基本信息start -->
				<div class="col-lg-6">
					<div class="panel panel-default">
						<div class="panel-heading ">
							<h3 class="panel-title">基本信息</h3>
						</div>
						<div class="panel-body">
							<div class="form-group">
								<label for="firstname" class="col-sm-3 control-label">房车编号</label>
								<div class="col-sm-9">
									<span class="form-control">{$list.number}</span>
								</div>
							</div>
							<div class="form-group">
								<label for="firstname" class="col-sm-3 control-label">房车名称</label>
								<div class="col-sm-9">
									<span class="form-control">{$list.name}</span>
								</div>
							</div>

							<div class="form-group ">
								<label for="firstname" class="control-label col-sm-3">车辆品牌</label>
								<div class="col-sm-9">
									<span class="form-control">{$list.carbrands.name}</span>
								</div>
							</div>
							<div class="form-group">
								<label for="firstname" class="control-label col-sm-3">车型</label>
								<div class="col-sm-9">
									<span class="form-control">{$list.carcates.name}</span>
								</div>
							</div>
							<div class="form-group">
								<label for="firstname" class="control-label col-sm-3">排挡</label>
								<div class="col-sm-9">
									{if isset($speed[$list.speed])}
									<span class="form-control">{$speed[$list.speed]}</span> {else/}
									<span class="form-control"></span> {/if}
								</div>
							</div>
							<div class="form-group">
								<label for="firstname" class="control-label col-sm-3">房车服务机构</label>
								<div class="col-sm-9">
									<span class="form-control">{$list.camps.name}</span>
								</div>
							</div>

							<div class="form-group">
								<label for="firstname" class="col-sm-3 control-label">泊位编号</label>
								<div class="col-sm-9">
									<span class="form-control">{$list.park_num}</span>
								</div>
							</div>
							<div class="form-group">
								<label for="firstname" class="col-sm-3 control-label">注册日期</label>
								<div class="col-sm-9">
									<span class="form-control">{$list.registration}</span>
								</div>
							</div>
							<div class="form-group">
								<label for="firstname" class="col-sm-3 control-label">车主姓名</label>
								<div class="col-sm-9">
									<span class="form-control">{$list.owner_name}</span>
								</div>
							</div>
							<div class="form-group">
								<label for="firstname" class="col-sm-3 control-label">车牌号</label>
								<div class="col-sm-9">
									<span class="form-control">{$list.brand_number}</span>
								</div>
							</div>

							<div class="form-group">
								<label for="firstname" class="control-label col-sm-3">国别</label>
								<div class="col-sm-9">
									<span class="form-control">{$list.carcountries.name}</span>
								</div>
							</div>

							<div class="form-group ">
								<label class="control-label col-sm-3">准驾类型</label>
								<div class="col-sm-9">
									{if isset($driverType[$list.driver_type])}
									<span class="form-control">{$driverType[$list.driver_type]}</span> {else/}
									<span class="form-control"></span> {/if}
								</div>
							</div>
						</div>
					</div>
				</div>
				<!-- 基本信息end -->
				<!-- 车内配套设施start -->
				<div class="col-lg-6">
					<div class="panel panel-default">
						<div class="panel-heading">
							<h3 class="panel-title">车内配套设施</h3>
						</div>
						<div class="panel-body">
							<div class="form-group">
								<label for="firstname" class="col-sm-4 control-label">长*宽*高(mm)</label>
								<div class="col-sm-8">
									<span class="form-control">{$list.size}</span>
								</div>
							</div>
							<div class="form-group">
								<label for="firstname" class="col-sm-4 control-label">单人床数量(张)</label>
								<div class="col-sm-8">
									<span class="form-control">{$list.single_bed_num}</span>
								</div>
							</div>
							<div class="form-group">
								<label for="firstname" class="col-sm-4 control-label">双人床数量(张)</label>
								<div class="col-sm-8">
									<span class="form-control">{$list.double_bed_num}</span>
								</div>
							</div>
							<div class="form-group">
								<label for="firstname" class="col-sm-4 control-label">可住几人</label>
								<div class="col-sm-8">
									<span class="form-control">{$list.people_num}</span>
								</div>
							</div>
							<div class="form-group">
								<label for="firstname" class="col-sm-4 control-label">沙发乘坐人数</label>
								<div class="col-sm-8">
									<span class="form-control">{$list.sofe_num}</span>
								</div>
							</div>
							{foreach $ziduans as $key=>$value}
								<div class="form-group ">
									<label for="firstname" class="control-label col-sm-4">{$key|lang}</label> 
									{foreach $value as $k=>$v}
										<label class="radio-inline">
					                      {if $list[$key]==$k}
					                      	<input id="{$key.$k}" name="{$key}" checked="true" value="{$k}" type="radio" disabled>{$v|lang}
					                      {else}
					                      	<input id="{$key.$k}" disabled name="{$key}" value="{$k}"  type="radio">{$v|lang}
					                      {/if}
					                    </label> 
				                	{/foreach}
								</div>
							{/foreach}

						</div>
					</div>
				</div>
				<!-- 车内配套设施end -->
				<!-- 图片start -->
				<div class="col-lg-10 col-lg-offset-1">
					<div class="panel panel-default">
						<div class="panel-heading">
							<h3 class="panel-title">封面图片</h3>
						</div>
						<div class="panel-body">
							{foreach $list['caravancover'] as $vc}
							<div><img src="{$vc}" style="width: 450px;"></div>
							{/foreach}
						</div>
					</div>
				</div>
				<div class="col-lg-10 col-lg-offset-1">
					<div class="panel panel-default">
						<div class="panel-heading">
							<h3 class="panel-title">内容图片</h3>
						</div>
						<div class="panel-body">
							{foreach $list['piccaravan'] as $vcon}
							<div><img src="{$vcon}" style="width: 350px; float: left;"></div>
							{/foreach}
						</div>
					</div>
				</div>
				<!-- 图片end -->
				<!-- 状态日历start -->
				<div class="col-lg-10 col-lg-offset-1">
					<div class="panel panel-default">
						<div class="panel-heading">
							<h3 class="panel-title">房车状态</h3>
						</div>
						<div class="panel-body">
							<div id="datepicker1"></div>
							<script>
								datePickerById1('#datepicker1', '#startdatesc', '#endatesc');
							</script>
						</div>
					</div>
				</div>
				<!-- 状态日历end -->
			</div>
			<!-- 选项卡内容1end -->
		</div>
		<!-- 选项卡内容end -->
	</div>
	<!-- 选项卡end -->
</div>